package top.simonby.iron.core.support;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

/**
 * 兼容web启动
 *
 * @author Simon
 * @date 2020/1/2 11:27
 **/
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
public abstract class AbstractApplicationBootSuper extends SpringBootServletInitializer {
    /**
     * 兼容Web容器启动
     *
     * @param application SpringApplicationBuilder
     * @return SpringApplicationBuilder
     */
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(this.getClass());
    }

}
